{% extends 'blog.html' %}
{% block title %}个人博客{% endblock %}
{% block content %}
{% for article in articles %}
<div class="card mt-2 mb-2 border-warning">
    <div class="card-body">
        <h4 class="card-title">
            <span class="badge badge-danger">
                {{ article.get_category_display }}
            </span>
            <a href="/blog_article_content/{{ article.id }}">{{ article.title }}</a>
        </h4>
        <h6 class="card-subtitle mb-2 text-muted">
            作者：{{ article.author }}
        </h6>
        <p class="card-text">
            {{ article.content|truncatechars:20 }}...
        </p>
        <small>
            {{ article.post_datetime }}
            阅读数：{{ article.read_count }}
        </small>
    </div>
</div>
{% endfor %}
{% endblock %}